Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: UiConfiguration.windowInsets #2200

Closed
wants to merge 1 commit into from

Conversation

swankjesse
Copy link
Collaborator

This introduces a new mutable property, windowInsets, that is propagated to the composition where it can be consumed.

We put the burden on the user of RedwoodView to set this value to something non-zero if they have insets to be consumed. I've added an accelerator on Android for this,

RedwoodLayout.consumeWindowInsets(mask: Int)

I'll look into a similar API for iOS and HTML to do likewise.


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

This introduces a new mutable property, windowInsets, that is
propagated to the composition where it can be consumed.

We put the burden on the user of RedwoodView to set this value
to something non-zero if they have insets to be consumed.
I've added an accelerator on Android for this,

  RedwoodLayout.consumeWindowInsets(mask: Int)

I'll look into a similar API for iOS and HTML to do likewise.
@swankjesse
Copy link
Collaborator Author

Stuff to do still:

  • Screenshot tests
  • iOS helper function to set insets from the enclosing Window
  • HTML helper function to set insets from the enclosing Window

This doesn't do anything with the existing safeAreaInsets value. I am tempted to delete that in follow-up. I don’t want to re-purpose that value as it has a non-zero value on existing host code but that value isn’t necessarily what we want.

@JakeWharton JakeWharton closed this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants